package cn.itcast.beans;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PostService {
	
	@Autowired
	private PostDao dao;

	public PostService() {
		
//		System.out.println("初始化PostService");
		
	}
	
	public void delete() {
		System.out.println("刪除");
		dao.run();
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("PostService [dao=");
		builder.append(dao);
		builder.append("]");
		return builder.toString();
	}
	
}
